<?php
namespace app\dsadmin\controller;
use app\dsadmin\model\Node;
use app\common\model\EnameModel;
use think\Controller;
use think\Db;

class Check extends Controller
{
    private $token = '8uSwrbevfUxSgQKvcmdx8hIezPQUXaLu';

    public function url()
    {
        $key = input('key');
        if ($key && $key == $this->token)
        {
            $str = Db::name('ename')->field('ename')->where(['zt' => 1])->select();
            return json_encode($str);
        }
    }
    public function beifeng()
    {
        $key = input('key');
        $url = input('url');
        if ($key && $key == $this->token)
        {
            $flag = Db::name('ename')->where('ename', $url)->setField(['status' => 0, 'zt' => 0]);
            return "ok";
        }
    }
}
